import request from '@/utils/request'
import qs from 'qs'
import { AxiosPromise } from 'axios'

interface Users {
  phone: string
  password: string
}
// 登录
export const login = (data: Users): AxiosPromise => {
  return request({
    method: 'POST',
    url: '/front/user/login',
    data: qs.stringify(data)
  })
}

// 获取用户信息
export const getUserInfo = (): AxiosPromise => {
  return request({
    method: 'GET',
    url: '/front/user/getInfo'
  })
}
